﻿using DevExpress.XtraEditors;
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DXBlankApp
{
    public partial class DataGridForm : DevExpress.XtraEditors.XtraForm
    {
        public DataGridForm()
        {
            InitializeComponent();
        }

        private DataTable GetUsers()
        {
            DataTable dt = new DataTable();
            string sql = "SELECT * FROM sysuser";
            string conn = "server=mysql-internet-cn-north-1-24c3306c43974ee2.rds.jdcloud.com;userid=mzz;pwd=Mzz188894791;port=3306;database=oa;";
            using (MySqlDataAdapter adapter = new MySqlDataAdapter(sql, conn))
            {
                adapter.Fill(dt);
            }
            return dt;
        }
        private void DataGridForm_Load(object sender, EventArgs e)
        {
            gridControl1.DataSource = GetUsers();
        }

        private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {

        }
    }
}